Optimal. Leaf size=44 \[ -\frac{a^2 A}{x}+b x (2 a B+A b)+a \log (x) (a B+2 A b)+\frac{1}{2} b^2 B x^2 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.026999, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.08, Rules used = {27, 76} \[ -\frac{a^2 A}{x}+b x (2 a B+A b)+a \log (x) (a B+2 A b)+\frac{1}{2} b^2 B x^2 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 76
Rubi steps
\begin{align*} \int \frac{(A+B x) \left (a^2+2 a b x+b^2 x^2\right )}{x^2} \, dx &=\int \frac{(a+b x)^2 (A+B x)}{x^2} \, dx\\ &=\int \left (b (A b+2 a B)+\frac{a^2 A}{x^2}+\frac{a (2 A b+a B)}{x}+b^2 B x\right ) \, dx\\ &=-\frac{a^2 A}{x}+b (A b+2 a B) x+\frac{1}{2} b^2 B x^2+a (2 A b+a B) \log (x)\\ \end{align*}
Mathematica [A] time = 0.0215618, size = 43, normalized size = 0.98 \[ -\frac{a^2 A}{x}+a \log (x) (a B+2 A b)+2 a b B x+\frac{1}{2} b^2 x (2 A+B x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.007, size = 46, normalized size = 1.1 \begin{align*}{\frac{{b}^{2}B{x}^{2}}{2}}+A{b}^{2}x+2\,abBx+2\,A\ln \left ( x \right ) ab+{a}^{2}B\ln \left ( x \right ) -{\frac{A{a}^{2}}{x}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00529, size = 62, normalized size = 1.41 \begin{align*} \frac{1}{2} \, B b^{2} x^{2} - \frac{A a^{2}}{x} +{\left (2 \, B a b + A b^{2}\right )} x +{\left (B a^{2} + 2 \, A a b\right )} \log \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.32359, size = 116, normalized size = 2.64 \begin{align*} \frac{B b^{2} x^{3} - 2 \, A a^{2} + 2 \,{\left (2 \, B a b + A b^{2}\right )} x^{2} + 2 \,{\left (B a^{2} + 2 \, A a b\right )} x \log \left (x\right )}{2 \, x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.351603, size = 42, normalized size = 0.95 \begin{align*} - \frac{A a^{2}}{x} + \frac{B b^{2} x^{2}}{2} + a \left (2 A b + B a\right ) \log{\left (x \right )} + x \left (A b^{2} + 2 B a b\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12871, size = 62, normalized size = 1.41 \begin{align*} \frac{1}{2} \, B b^{2} x^{2} + 2 \, B a b x + A b^{2} x - \frac{A a^{2}}{x} +{\left (B a^{2} + 2 \, A a b\right )} \log \left ({\left | x \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]